<!doctype html>
<html lang="en" ng-app="insuranceApp">
<head>
    <meta charset="UTF-8">
    <meta name = "format-detection" content = "telephone=no">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <title ng-bind="pageTitle"></title>
    <link  rel="stylesheet" href="static/dist/css/app-82ec960ace.css">
    <link  rel="stylesheet" href="static/dist/css/app.css">
    <script type="text/javascript">
        window.zhuge = window.zhuge || [];
        window.zhuge.methods = "_init debug identify track trackLink trackForm page".split(" ");
        window.zhuge.factory = function(b) {
            return function() {
                var a = Array.prototype.slice.call(arguments);
                a.unshift(b);
                window.zhuge.push(a);
                return window.zhuge;
            }
        };
        for (var i = 0; i < window.zhuge.methods.length; i++) {
            var key = window.zhuge.methods[i];
            window.zhuge[key] = window.zhuge.factory(key);
        }
        window.zhuge.load = function(b, x) {
            if (!document.getElementById("zhuge-js")) {
                var a = document.createElement("script");
                var verDate = new Date();
                var verStr = verDate.getFullYear().toString()
                        + verDate.getMonth().toString() + verDate.getDate().toString();

                a.type = "text/javascript";
                a.id = "zhuge-js";
                a.async = !0;
                a.src = (location.protocol == 'http:' ? "http://sdk.zhugeio.com/zhuge.min.js?v=" : 'https://zgsdk.zhugeio.com/zhuge.min.js?v=') + verStr;
                var c = document.getElementsByTagName("script")[0];
                c.parentNode.insertBefore(a, c);
                window.zhuge._init(b, x)
            }
        };
        window.zhuge.load('6b3c569f042040f5bf32285acb975ac3');
    </script>
    <script src="/static/jquery/jquery-1.12.3.min.js"></script>
</head>
<body>
<div class="agreeManager">
    
    <div class="title">
         <p class="noTitle">神秘大礼</p>
         <p>连续5年，每年最高赔偿额</p>
         <p>150万的志愿专项保险</p>
    </div>
    <div class="text">
        <h3>情爱的志愿伙伴</h3>
        <p>恭喜您为志愿服务装备了属于自己的机甲战袍！从此你可以自由、无虑地从事自己喜爱的志愿服务！在线领取、在线理赔，互联网+志愿保障将更符合你的生活方式！</p>
        <p>由志趣基金会提供的志愿服务专用保险保障包括第三方责任、救护车急救、意外医疗、住院津贴、意外残疾、意外身故、猝死等七方面。</p>
    </div>
    <div class="text">
        <h3>在线领取的两个步骤：</h3>
        <p>1.开通平安银行保险理赔专用账户。</p>
        <p>2.获取志愿专项保险</p>
    </div>
    <div class="msg">
        <input id="checkbox" type="checkbox" />
        <span>同意 <a  href="void:javascript;">《志愿服务保险保障细则》</a> </span>
    </div>
    <div class="bot-title"><a ui-href="">领取神秘大礼</a> </div>
</div>
</body>
<script src="libs/qrcode/qrcode.min.js"></script>

<script>
    (function ($) {
        $(function () {
            var memberId;
            var tools={
                ajaxRequestCheckUser:function (options, callback) {
                    $.ajax({
                        type: "post",
                        url: "window.location.host/spreadInsurance/checkUser",
                        datattype: "json",
                        contentType: 'application/json; charset=utf-8',
                        data: options,
                        success: function(basedata) {
                            callback(basedata);
                        }
                    })
                },
                ajaxRequestCreate:function (options, callback) {
                    $.ajax({
                        type: "post",
                        url: "window.location.host/spreadInsurance/create",
                        datatype: "json",
                        contentType: 'application/json; charset=utf-8',
                        data: options,
                        success: function(basedata) {
                            callback(basedata);
                        }
                    })
                },
                getParam:function () {
                    var that = this,
                            url = location.search,
                            resultObject = new Object,
                            index;
                    if (url.indexOf('?') != -1) {
                        var parmString = url.substr(1),
                                parmStrings = parmString.split('&')
                        for (var i = 0; i < parmStrings.length; i++) {
                            var key, value, keyIndex, valueIndex;
                            key = parmStrings[i].substring(0, parmStrings[i].indexOf('='));
                            value = parmStrings[i].substring(parmStrings[i].indexOf('=') + 1, parmStrings[i].length);
                            resultObject[key] = decodeURIComponent(value);
                        }
                    }
                    console.log(that.globalOptions.id)
                    return resultObject;
                },
                main:function () {
                    var that=this,
                            param=that.getParam();
                    console.log(param)
                    if(!param.memberId||param.memberId=="null"){
                        alert('用户未登录')
                    }else{
                        that.ajaxRequestCheckUser(param,function (basedata) {
                            if(basedata.code==0){
                                if (basedata.data.flag==false){
                                    location.href('nomanage')
                                }else{
                                    var options={
                                        mobile:data.data.member.bundMobile,
                                        name: data.data.member.realName,
                                        retUrl:'',
                                        pageRetUrl:'',
                                        orderRetUrl:'',
                                        shopType:10,
                                        business:'A'
                                    }
                                    that.ajaxRequestCreate(options,function (basedata) {
                                        if(basedata.code==0){
                                            var invite =  basedata.data.invite
                                            sessionStorage.setItem('invite',JSON.stringify(invite))
                                        }
                                    })
                                }
                            }
                        })
                    }
                },
                init:function () {
                    this.main();
                }
            }
            tools.init();
        })

    })(jQuery)
</script>

</html>